Skip to content

chore: Add Storybook MVP #2366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 29, 2025
Merged

chore: Add Storybook MVP #2366

merged 4 commits into from
May 29, 2025

Conversation

dgca
Copy link
Contributor

@dgca dgca commented May 16, 2025

What changed? Why?

Adds Storybook and a couple of demo stories to test out Chromatic and upcoming docs migration support.
Switches to Vite for bundling Tailwind which is required for styles to work in Storybook.

Notes to reviewers

How has it been tested?

Manually

Copy link

vercel bot commented May 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 5:02pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 5:02pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 5:02pm

@cb-heimdall
Copy link

cb-heimdall commented May 16, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 2/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@cb-heimdall
Copy link

Review Error for Joseph7400 @ 2025-05-22 06:08:31 UTC
User must have write permissions to review

@Joseph7400
Copy link

What changed? Why?

Adds Storybook and a couple of demo stories to test out Chromatic and upcoming docs migration support

Notes to reviewers

Styling doesn't work at the moment. Two options for how to fix:

  1. We can change the base branch of chore: Prefix component classnames #2310 to main. That will switch our Tailwind setup to use Vite. This will be a breaking change, but will actually unblock a couple teams who have asked for this.

  2. We can set up Postcss to compile Tailwind styles. This will be more work, but wouldn't require breaking changes.

How has it been tested?

Manually

@cb-heimdall
Copy link

Review Error for Joseph7400 @ 2025-05-22 06:12:24 UTC
User must have write permissions to review

@cb-heimdall
Copy link

Review Error for Joseph7400 @ 2025-05-22 09:55:48 UTC
User must have write permissions to review

decorators: [
(Story) => (
<OnchainKitProvider
apiKey={getApiKey()}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this instead of

process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY ?? undefined

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC Storybook didn't have access to process.env. This way we can set that up and things will still work.

Honestly, we should've just let it be undefined, but since this is the MVP setup for Storybook, this seemed fine for now.

@dgca dgca merged commit 0d455ba into main May 29, 2025
15 checks passed
@dgca dgca deleted the danc/add-storybook branch May 29, 2025 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants